package com.t168.appinfo.service.reception.appversion.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.t168.appinfo.dao.reception.appversion.AppVersionMapper;
import com.t168.appinfo.entity.AppVersion;
import com.t168.appinfo.service.reception.appversion.AppVersionService;

@Service("appVersionService")
public class AppVersionServiceImpl implements AppVersionService {

	@Resource(name = "appVersionMapper")
	private AppVersionMapper appVersionMapper;
	
	
	public AppVersionMapper getAppVersionMapper() {
		return appVersionMapper;
	}

	public void setAppVersionMapper(AppVersionMapper appVersionMapper) {
		this.appVersionMapper = appVersionMapper;
	}



	

	@Override
	public boolean addAppVersionSave(AppVersion appVersion) {
		boolean flag = false;
		
		if(appVersionMapper.addAppVersionSave(appVersion) > 0){
			flag = true;
		}
		return flag;
	}

	@Override
	public int getNewVersionId(int appId) {
		return appVersionMapper.getNewVersionId(appId);
	}

	@Override
	public int delAppVersion(int appId) {
		
		return appVersionMapper.delAppVersion(appId);
	}

	@Override
	public AppVersion getVersionInfoByAId(int appId) {
		return appVersionMapper.getVersionInfoByAId(appId);
	}

	@Override
	public boolean modifyVersionInfo(AppVersion appVersion) {
		boolean flag = false;
		
		if(appVersionMapper.modifyVersionInfo(appVersion) > 0){
			flag = true;
		}
		return flag;
	}

	

}
